import Vue from 'vue'
import Router from 'vue-router'
import Layout from '../pages/layout.vue'
import Details from '../pages/details.vue' //headers和footers不放在路由中,始终存 在且不变
import Car from "../pages/details/car.vue"
import Hill from "../pages/details/hill.vue"
import Earth from "../pages/details/earth.vue"
import Loud from "../pages/details/loud.vue"

Vue.use(Router)

export default new Router({
	routes:[
		{
			path:'/',
			name:'Layout',
			component:Layout
		},
		{
			path:'/',
			name:'details',
			component:Details,
			redirect:"/details/earth",
			children:[
				{path:'car',name:'car',component:Car},
				{path:'hill',name:'hill',component:Hill},
				{path:'earth',name:'earth',component:Earth},
				{path:'loud',name:'loud',component:Loud}
			]
		}
	]
})
